using System;
using ZhCun.DbCore.Entitys;

namespace MyConsume.Models
{
	public partial class TConsumeType : EntityBase
	{
		private System.String _Id;
		/// <summary>
		/// Id
		/// </summary>
		[Entity(ColumnName = CNId, IsPrimaryKey = true, IsNotNull = true)]
		public System.String Id
		{
			get { return _Id; }
			set
			{
				_Id = value;
				base.SetFieldChanged(CNId) ;
			}
		}

		private System.String _UserId;
		/// <summary>
		/// UserId
		/// </summary>
		[Entity(ColumnName = CNUserId, IsNotNull = true)]
		public System.String UserId
		{
			get { return _UserId; }
			set
			{
				_UserId = value;
				base.SetFieldChanged(CNUserId) ;
			}
		}

		private System.DateTime _AddTime;
		/// <summary>
		/// AddTime
		/// </summary>
		[Entity(ColumnName = CNAddTime, IsNotNull = true)]
		public System.DateTime AddTime
		{
			get { return _AddTime; }
			set
			{
				_AddTime = value;
				base.SetFieldChanged(CNAddTime) ;
			}
		}

		private System.String _AddHost;
		/// <summary>
		/// AddHost
		/// </summary>
		[Entity(ColumnName = CNAddHost)]
		public System.String AddHost
		{
			get { return _AddHost; }
			set
			{
				_AddHost = value;
				base.SetFieldChanged(CNAddHost) ;
			}
		}

		private System.DateTime _LastTime;
		/// <summary>
		/// LastTime
		/// </summary>
		[Entity(ColumnName = CNLastTime, IsNotNull = true)]
		public System.DateTime LastTime
		{
			get { return _LastTime; }
			set
			{
				_LastTime = value;
				base.SetFieldChanged(CNLastTime) ;
			}
		}

		private System.String _LastHost;
		/// <summary>
		/// LastHost
		/// </summary>
		[Entity(ColumnName = CNLastHost)]
		public System.String LastHost
		{
			get { return _LastHost; }
			set
			{
				_LastHost = value;
				base.SetFieldChanged(CNLastHost) ;
			}
		}

		private System.String _TypeName;
		/// <summary>
		/// TypeName
		/// </summary>
		[Entity(ColumnName = CNTypeName, IsNotNull = true)]
		public System.String TypeName
		{
			get { return _TypeName; }
			set
			{
				_TypeName = value;
				base.SetFieldChanged(CNTypeName) ;
			}
		}

		private System.String _TypeNamePY;
		/// <summary>
		/// TypeNamePY
		/// </summary>
		[Entity(ColumnName = CNTypeNamePY)]
		public System.String TypeNamePY
		{
			get { return _TypeNamePY; }
			set
			{
				_TypeNamePY = value;
				base.SetFieldChanged(CNTypeNamePY) ;
			}
		}

		private System.Int16 _AmountType;
		/// <summary>
		/// 资金类型：0 支出，1：收入
		/// </summary>
		[Entity(ColumnName = CNAmountType, IsNotNull = true)]
		public System.Int16 AmountType
		{
			get { return _AmountType; }
			set
			{
				_AmountType = value;
				base.SetFieldChanged(CNAmountType) ;
			}
		}

		private System.Int32 _OrderNo;
		/// <summary>
		/// 使用次数，排序降序
		/// </summary>
		[Entity(ColumnName = CNOrderNo, IsNotNull = true)]
		public System.Int32 OrderNo
		{
			get { return _OrderNo; }
			set
			{
				_OrderNo = value;
				base.SetFieldChanged(CNOrderNo) ;
			}
		}

		private System.String _Remark;
		/// <summary>
		/// Remark
		/// </summary>
		[Entity(ColumnName = CNRemark)]
		public System.String Remark
		{
			get { return _Remark; }
			set
			{
				_Remark = value;
				base.SetFieldChanged(CNRemark) ;
			}
		}

		private System.Boolean _IsMust;
		/// <summary>
		/// 是否必须的，1：必须，不可删除
		/// </summary>
		[Entity(ColumnName = CNIsMust, IsNotNull = true)]
		public System.Boolean IsMust
		{
			get { return _IsMust; }
			set
			{
				_IsMust = value;
				base.SetFieldChanged(CNIsMust) ;
			}
		}

		#region 字段名的定义
		public const string CNId = "Id";
		public const string CNUserId = "UserId";
		public const string CNAddTime = "AddTime";
		public const string CNAddHost = "AddHost";
		public const string CNLastTime = "LastTime";
		public const string CNLastHost = "LastHost";
		public const string CNTypeName = "TypeName";
		public const string CNTypeNamePY = "TypeNamePY";
		public const string CNAmountType = "AmountType";
		public const string CNOrderNo = "OrderNo";
		public const string CNRemark = "Remark";
		public const string CNIsMust = "IsMust";
		#endregion

	}
}
